
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>找回密码/重置密码</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="找回密码/重置密码,甜甜圈,知识库,问答系统">
  <meta name="description" content="找回密码/重置密码,甜甜圈,知识库,问答系统">
  <#include "/common/header.html">
  
<div class="main layui-clear">
  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title">
        <li class="layui-this">找回密码</li>
      </ul>
      <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
			<#if mailAddress?if_exists>
			<div>重置密码链接已经发送到您的邮箱${mailAddress!""}中，请登录查看。</div>
			<#elseif validate?if_exists>
				<#if validate == "true">
				<div class="fly-msg">您好，请重置您的密码：</div>
		          <div class="layui-form layui-form-pane"  style="margin-top: 30px;">
		            <form action="/user/resetPassword.html" method="post"  json-submit="false">
		              <div class="layui-form-item">
		                <label for="L_pass" class="layui-form-label">密码</label>
		                <div class="layui-input-inline">
		                  <input type="password" id="L_pass" name="password" required lay-verify="password" autocomplete="off" class="layui-input">
		                </div>
		                <div class="layui-form-mid layui-word-aux">6到16个字符</div>
		              </div>
		              <div class="layui-form-item">
		                <label for="L_repass" class="layui-form-label">确认密码</label>
		                <div class="layui-input-inline">
		                  <input type="password" id="L_repass" name="repass" required lay-verify="confirmPwd" autocomplete="off" class="layui-input">
		                </div>
		              </div>
		              <div class="layui-form-item">
		                <input type="hidden" name="email" value="${email!""}">
		                <button class="layui-btn" alert="1" lay-filter="*" lay-submit>提交</button>
		              </div>
		            </form>
		          </div>
				<#else>
				<div class="fly-error">该重置密码链接已失效，请点击以下链接重新校验您的信息</div>
          		<div><a href="/forget.html">点我重新校验</a></div>
				</#if>
			<#else>
			<div class="layui-form layui-form-pane">
				<#if msg?if_exists><div class="fly-error">${msg!""}</div></#if>
			  <form method="post" action="/user/forget.html" json-submit="false">
			    <div class="layui-form-item">
			      <label for="L_email" class="layui-form-label">邮箱</label>
			      <div class="layui-input-inline">
			        <input type="text" id="L_email" name="email" required lay-verify="email" autocomplete="off" value="${email!""}" class="layui-input">
			      </div>
			    </div>
			    <div class="layui-form-item">
			      <label for="vercode" class="layui-form-label">验证码</label>
			      <div class="layui-input-inline">
			        <input type="text" id="vercode" name="vercode" required lay-verify="required" placeholder="请输入验证码" autocomplete="off" class="layui-input">
			      </div>
			      <div id="vcImgDiv"></div>
			    </div>
			    <div class="layui-form-item">
			      <button class="layui-btn" alert="1" lay-filter="*" lay-submit>获取重置密码连接</button>
			    </div>
			  </form>
			</div>
          </#if>
          
        </div>
      </div>
    </div>
  </div>
</div>

<#assign jsFilename="user">
<#include "/common/footer.html">
</body>
</html>